<template>
  <div>
    <van-swipe class="my-swipe" :loop="false" indicator-color="white">
      <van-swipe-item v-for="(page, index) in pages" :key="index">
        <van-grid square>
          <van-grid-item
            v-for="(item, ind) in page"
            :key="ind"
            :icon="item.src"
            :text="item.text"
          />
        </van-grid>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: "swipe",

  data() {
    return {};
  },

  mounted() {},

  methods: {},
  props: {
    pages: {
      type: Array,
    },
  },
};
</script>

<style  scoped>
.my-swipe {
  height: 4.8rem;
}
</style>